#include <stdio.h>
#define MAXNUM 1000
int countchar(char list[])
{
	int i, count = 0;
	for (i = 0; list[i] != '\0'; i++)
		count++;
	return (count);
}

int main ( )
{
	char message [MAXNUM] ;
	int numchar ;
	printf ( "\nType in any number of characters: " );
	gets (message);
	numchar = countchar (message) ;
	printf ( "The number of characters just entered is %d\n", numchar) ;
	return 0;
}


